/* 组件样式 */

/* 历史记录列表 */
.history-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 15px;
    padding: 20px;
    position: relative;
    min-height: 400px;
    width: 100%;
}

.history-item {
    background: #2d2d2d;
    border-radius: 8px;
    padding: 16px;
    display: flex;
    gap: 16px;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    border: 1px solid transparent;
    min-height: 160px;
    width: 100%;
}

.history-item:hover {
    background: #3a3a3a;
    border-color: #0078d4;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 120, 212, 0.1);
}

.history-poster {
    width: 90px;
    height: 135px;
    position: relative;
    border-radius: 4px;
    background: #404040;
    flex-shrink: 0;
    overflow: hidden;
}

.history-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
}

.history-poster .poster-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: #999;
    background: linear-gradient(135deg, #404040 0%, #2d2d2d 100%);
}

.history-progress-overlay {
    position: absolute;
    bottom: 2px;
    right: 2px;
    background: rgba(0, 120, 212, 0.9);
    color: white;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 3px;
    font-weight: 600;
}

.history-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-width: 0;
    padding-right: 8px;
    /* 为右侧按钮留出空间 */
}

.history-title {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 6px;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #fff;
}

.history-meta {
    font-size: 11px;
    color: #aaa;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.history-separator {
    color: #666;
}

.history-episode {
    font-size: 12px;
    color: #0078d4;
    margin-bottom: 4px;
    font-weight: 500;
}

.history-time {
    font-size: 11px;
    color: #999;
    margin-bottom: 5px;
}

.history-duration {
    font-size: 11px;
    color: #0078d4;
    margin-bottom: 8px;
    font-weight: 500;
}

.history-progress {
    height: 3px;
    background: #404040;
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 5px;
}

.progress-bar {
    height: 100%;
    background: #0078d4;
    transition: width 0.3s ease;
}

.progress-text {
    font-size: 10px;
    color: #0078d4;
    margin: 0;
}

.history-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-left: 10px;
}

.history-actions button {
    padding: 6px 12px;
    border: none;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 60px;
}

.btn-continue {
    background: #0078d4;
    color: white;
}

.btn-continue:hover {
    background: #106ebe;
    transform: scale(1.05);
}

.btn-remove {
    background: #dc3545;
    color: white;
}

.btn-remove:hover {
    background: #c82333;
    transform: scale(1.05);
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .history-list {
        grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    }
}

@media (max-width: 768px) {
    .history-list {
        grid-template-columns: 1fr;
        padding: 15px;
    }

    .history-item {
        padding: 14px;
        gap: 14px;
    }

    .history-poster {
        width: 75px;
        height: 112px;
    }

    .history-info {
        padding-right: 6px;
    }

    .history-title {
        font-size: 14px;
    }

    .history-actions {
        flex-direction: row;
        gap: 5px;
    }

    .history-actions button {
        padding: 4px 8px;
        font-size: 10px;
        min-width: 50px;
    }
}

/* 设置页面 */
.settings-section {
    margin-bottom: 30px;
}

.settings-section h3 {
    font-size: 18px;
    margin-bottom: 15px;
    color: #ffffff;
    border-bottom: 1px solid #404040;
    padding-bottom: 8px;
}

.settings-description {
    font-size: 14px;
    color: #999;
    margin-bottom: 15px;
    line-height: 1.5;
}

.site-list {
    margin-bottom: 15px;
}

.route-aliases-list {
    margin-bottom: 15px;
}

.route-alias-item {
    background: #2d2d2d;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.route-alias-info {
    flex: 1;
}

.route-alias-original {
    font-size: 14px;
    color: #ffffff;
    margin-bottom: 4px;
}

.route-alias-display {
    font-size: 12px;
    color: #0078d4;
}

.route-alias-actions {
    display: flex;
    gap: 8px;
}

/* 线路别名模态框样式 */
.route-alias-manager {
    min-width: 600px;
}

.route-alias-list-modal {
    max-height: 450px;
    overflow-y: auto;
    margin-bottom: 20px;
    padding: 5px;
}

.route-alias-edit-item {
    background: linear-gradient(135deg, #2d2d2d, #323232);
    border-radius: 12px;
    padding: 18px;
    margin-bottom: 12px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    border: 1px solid #404040;
    transition: all 0.3s ease;
}

.route-alias-edit-item:hover {
    background: linear-gradient(135deg, #353535, #3a3a3a);
    border-color: #0078d4;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 120, 212, 0.15);
}

.alias-edit-info {
    flex: 1;
}

.alias-original-name {
    font-size: 15px;
    color: #ffffff;
    margin-bottom: 12px;
    font-weight: 500;
}

.alias-input-group {
    display: flex;
    align-items: center;
    gap: 12px;
}

.alias-input-group label {
    font-size: 13px;
    color: #0078d4;
    min-width: 45px;
    font-weight: 500;
}

.alias-input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #404040;
    border-radius: 6px;
    background: #1a1a1a;
    color: #ffffff;
    font-size: 13px;
    transition: all 0.3s ease;
}

.alias-input:focus {
    outline: none;
    border-color: #0078d4;
    box-shadow: 0 0 0 3px rgba(0, 120, 212, 0.2);
    background: #222222;
}

.alias-edit-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.btn-save-alias,
.btn-remove-alias {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    min-width: 70px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-save-alias {
    background: linear-gradient(135deg, #0078d4, #106ebe);
    color: #ffffff;
}

.btn-save-alias:hover {
    background: linear-gradient(135deg, #106ebe, #005a9e);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 120, 212, 0.3);
}

.btn-remove-alias {
    background: linear-gradient(135deg, #6c757d, #5a6268);
    color: #ffffff;
}

.btn-remove-alias:hover {
    background: linear-gradient(135deg, #dc3545, #c82333);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(220, 53, 69, 0.3);
}

.empty-alias-state {
    text-align: center;
    padding: 60px 30px;
    color: #999;
    background: linear-gradient(135deg, #2a2a2a, #2d2d2d);
    border-radius: 12px;
    border: 2px dashed #404040;
}

.empty-alias-state p {
    margin-bottom: 10px;
    line-height: 1.6;
    font-size: 14px;
}

.empty-alias-state p:first-child {
    font-size: 16px;
    color: #ccc;
    font-weight: 500;
}

.readonly-input {
    background: #404040 !important;
    color: #999 !important;
    cursor: not-allowed;
}

.alias-form .form-group {
    margin-bottom: 15px;
}

.alias-form label {
    display: block;
    margin-bottom: 5px;
    font-size: 14px;
    color: #ffffff;
}

/* 表单样式增强 */
.form-hint {
    font-size: 12px;
    color: #999;
    font-weight: normal;
}

.form-description {
    display: block;
    margin-top: 4px;
    font-size: 11px;
    color: #999;
    line-height: 1.4;
}

.site-form .form-group {
    margin-bottom: 18px;
}

.site-form input[type="text"],
.site-form input[type="url"],
.site-form select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #404040;
    border-radius: 4px;
    background: #1a1a1a;
    color: #ffffff;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.site-form input[type="text"]:focus,
.site-form input[type="url"]:focus,
.site-form select:focus {
    outline: none;
    border-color: #0078d4;
    box-shadow: 0 0 0 2px rgba(0, 120, 212, 0.2);
}

.site-item {
    background: #2d2d2d;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-info h4 {
    font-size: 14px;
    margin-bottom: 5px;
}

.site-info p {
    font-size: 12px;
    color: #999;
    margin-bottom: 2px;
}

.site-blocked-routes {
    font-size: 11px;
    color: #ff6b6b !important;
    background: rgba(255, 107, 107, 0.1);
    padding: 2px 6px;
    border-radius: 3px;
    margin-top: 4px;
}

.site-actions {
    display: flex;
    gap: 10px;
}

.btn-edit,
.btn-delete {
    padding: 6px 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: background 0.3s ease;
}

.btn-edit {
    background: #6c757d;
    color: #ffffff;
}

.btn-edit:hover {
    background: #5a6268;
}

.btn-delete {
    background: #dc3545;
    color: #ffffff;
}

.btn-delete:hover {
    background: #c82333;
}

/* 表单样式 */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    color: #0078d4;
    font-weight: 500;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px 16px;
    background: #1a1a1a;
    border: 1px solid #404040;
    border-radius: 8px;
    color: #ffffff;
    font-size: 14px;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #0078d4;
    box-shadow: 0 0 0 3px rgba(0, 120, 212, 0.2);
    background: #222222;
}

.form-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 20px;
}

.form-hint {
    margin-top: 6px;
    font-size: 12px;
    color: #999;
    line-height: 1.4;
}

.form-hint.warning {
    color: #ffa500;
}

.form-hint.info {
    color: #17a2b8;
}

/* 影片详情页面 */
.detail-container {
    display: flex;
    gap: 20px;
}

.detail-poster {
    width: 200px;
    flex-shrink: 0;
}

.detail-poster img {
    width: 100%;
    border-radius: 8px;
}

.detail-info {
    flex: 1;
}

/* 标题行样式 - 包含标题和分享按钮 */
.detail-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
    gap: 15px;
}

.detail-title {
    font-size: 24px;
    margin: 0;
    flex: 1;
    min-width: 0;
    /* 允许标题缩减 */
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.detail-meta {
    background: rgba(255, 255, 255, 0.02);
    padding: 18px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 20px;
}

/* 网格布局 - 简短信息多列显示 */
.meta-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px 20px;
    margin-bottom: 15px;
}

.meta-item {
    display: flex;
    align-items: center;
    font-size: 14px;
    line-height: 1.4;
}

.meta-item .meta-label {
    color: #999999;
    font-weight: 500;
    margin-right: 8px;
    flex-shrink: 0;
    position: relative;
}

.meta-item .meta-label::after {
    content: ':';
    margin-left: 2px;
}

.meta-item .meta-value {
    color: #ffffff;
    flex: 1;
}

.meta-item .meta-value.score {
    color: #ffa500;
    font-weight: bold;
}

/* 完整行布局 - 长文本信息 */
.meta-full-row {
    display: flex;
    align-items: flex-start;
    font-size: 14px;
    line-height: 1.4;
    margin-bottom: 10px;
}

.meta-full-row:last-child {
    margin-bottom: 0;
}

.meta-full-row .meta-label {
    color: #999999;
    font-weight: 500;
    min-width: 50px;
    margin-right: 12px;
    flex-shrink: 0;
    position: relative;
}

.meta-full-row .meta-label::after {
    content: ':';
    margin-left: 2px;
}

.meta-full-row .meta-value {
    color: #ffffff;
    flex: 1;
    word-break: break-all;
}

/* 标签样式 */
.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.tag {
    padding: 4px 10px;
    background: linear-gradient(135deg, #0078d4, #106ebe);
    color: #ffffff;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.detail-desc {
    background: rgba(255, 255, 255, 0.02);
    padding: 18px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 25px;
}

.detail-desc h4 {
    font-size: 16px;
    color: #ffffff;
    margin: 0 0 10px 0;
    font-weight: 600;
}

.detail-desc p {
    line-height: 1.6;
    color: #cccccc;
    margin: 0;
}

.episodes-section {
    margin-top: 20px;
}

/* 站点标识和标签同一行 */
.site-and-tags-row {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.current-site-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #0078d4, #106ebe);
    color: #ffffff;
    padding: 6px 12px;
    border-radius: 16px;
    font-size: 13px;
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(0, 120, 212, 0.3);
    flex-shrink: 0;
}

.current-site-badge i {
    font-size: 14px;
}

/* 调整标签样式以适应同一行显示 */
.site-and-tags-row .detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 0;
}

.episodes-section h3 {
    font-size: 18px;
    margin-bottom: 15px;
    color: #ffffff;
}

/* 线路选择标签 */
.route-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.route-tab {
    padding: 8px 16px;
    background: linear-gradient(135deg, #404040, #2a2a2a);
    border: 1px solid #555555;
    border-radius: 20px;
    color: #cccccc;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.3s ease-in-out;
    white-space: nowrap;
    position: relative;
    overflow: hidden;
}

.route-tab::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s ease;
}

.route-tab:hover::before {
    left: 100%;
}

.route-tab:hover {
    background: linear-gradient(135deg, #0078d4, #106ebe);
    border-color: #0078d4;
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 120, 212, 0.3);
}

.route-tab.active {
    background: linear-gradient(135deg, #0078d4, #106ebe);
    border-color: #0078d4;
    color: #ffffff;
    box-shadow: 0 0 15px rgba(0, 120, 212, 0.4);
}

.route-tab.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    height: 2px;
    background: #ffffff;
    border-radius: 1px;
}

.episodes-container {
    margin-top: 15px;
}

.episodes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 10px;
}

.episode-btn {
    padding: 10px 15px;
    background: linear-gradient(135deg, #3a3a3a, #2d2d2d);
    border: 1px solid #555555;
    border-radius: 8px;
    color: #ffffff;
    cursor: pointer;
    text-align: center;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.3s ease-in-out;
    position: relative;
    overflow: hidden;
}

.episode-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.4s ease;
}

.episode-btn:hover::before {
    left: 100%;
}

.episode-btn:hover {
    background: linear-gradient(135deg, #0078d4, #106ebe);
    border-color: #0078d4;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 120, 212, 0.25);
}

.episode-btn.watched {
    background: linear-gradient(135deg, #28a745, #1e7e34);
    border-color: #28a745;
    box-shadow: 0 2px 8px rgba(40, 167, 69, 0.2);
}

.episode-btn.watched:hover {
    background: linear-gradient(135deg, #32c653, #28a745);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

/* 当前剧集高亮 */
.episode-btn.current-episode {
    background: linear-gradient(135deg, #ff6b35, #e55a2b);
    border-color: #ff6b35;
    color: white;
    font-weight: bold;
    box-shadow: 0 0 0 2px rgba(255, 107, 53, 0.3), 0 2px 8px rgba(255, 107, 53, 0.4);
    animation: currentEpisodePulse 2s ease-in-out infinite;
}

.episode-btn.current-episode:hover {
    background: linear-gradient(135deg, #ff7f56, #ff6b35);
    transform: translateY(-2px);
    box-shadow: 0 0 0 2px rgba(255, 107, 53, 0.4), 0 4px 12px rgba(255, 107, 53, 0.5);
}

@keyframes currentEpisodePulse {

    0%,
    100% {
        box-shadow: 0 0 0 2px rgba(255, 107, 53, 0.3), 0 2px 8px rgba(255, 107, 53, 0.4);
    }

    50% {
        box-shadow: 0 0 0 4px rgba(255, 107, 53, 0.2), 0 2px 8px rgba(255, 107, 53, 0.4);
    }
}

/* 当前正在播放的集数样式 */
.episode-btn.current-playing {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    border-color: #e74c3c;
    color: white;
    font-weight: bold;
    position: relative;
    box-shadow: 0 0 0 2px rgba(231, 76, 60, 0.4), 0 2px 12px rgba(231, 76, 60, 0.3);
    animation: currentPlayingPulse 1.5s ease-in-out infinite;
}

.episode-btn.current-playing::after {
    content: '▶';
    position: absolute;
    top: 2px;
    right: 4px;
    font-size: 10px;
    color: rgba(255, 255, 255, 0.9);
    animation: playIconBlink 2s ease-in-out infinite;
}

.episode-btn.current-playing:hover {
    background: linear-gradient(135deg, #f14f3f, #e74c3c);
    transform: translateY(-2px);
    box-shadow: 0 0 0 2px rgba(231, 76, 60, 0.5), 0 4px 16px rgba(231, 76, 60, 0.4);
}

@keyframes currentPlayingPulse {

    0%,
    100% {
        box-shadow: 0 0 0 2px rgba(231, 76, 60, 0.4), 0 2px 12px rgba(231, 76, 60, 0.3);
    }

    50% {
        box-shadow: 0 0 0 4px rgba(231, 76, 60, 0.2), 0 2px 12px rgba(231, 76, 60, 0.3);
    }
}

@keyframes playIconBlink {

    0%,
    50%,
    100% {
        opacity: 1;
    }

    25%,
    75% {
        opacity: 0.4;
    }
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.empty-state i {
    font-size: 48px;
    margin-bottom: 15px;
    display: block;
}

.empty-state h3 {
    font-size: 18px;
    margin-bottom: 8px;
    color: #cccccc;
}

.empty-state p {
    font-size: 14px;
    line-height: 1.5;
}

/* 历史页面空状态样式 - 完全居中 */
.history-list .empty-state {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    max-width: 500px;
    padding: 40px 20px;
}

.history-list .empty-state i {
    font-size: 64px;
    margin-bottom: 20px;
    opacity: 0.6;
}

.history-list .empty-state h3 {
    font-size: 20px;
    margin-bottom: 12px;
    color: #e0e0e0;
    font-weight: 500;
}

.history-list .empty-state p {
    font-size: 15px;
    line-height: 1.6;
    opacity: 0.8;
    max-width: 400px;
    margin: 0 auto;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .detail-container {
        flex-direction: column;
    }

    .detail-poster {
        width: 100%;
        max-width: 300px;
        margin: 0 auto 20px;
    }

    .detail-meta {
        padding: 15px;
    }

    .meta-grid {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
        gap: 10px 15px;
        margin-bottom: 12px;
    }

    .meta-item {
        font-size: 13px;
    }

    .meta-item .meta-label {
        margin-right: 6px;
    }

    .meta-full-row {
        font-size: 13px;
        margin-bottom: 8px;
    }

    .meta-full-row .meta-label {
        min-width: 45px;
        margin-right: 10px;
    }

    .detail-desc {
        padding: 15px;
    }

    .route-tabs {
        gap: 8px;
    }

    .route-tab {
        padding: 6px 12px;
        font-size: 12px;
    }

    .episodes-grid {
        grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
        gap: 8px;
    }

    .episode-btn {
        padding: 8px 10px;
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .detail-title-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .detail-title {
        font-size: 20px;
        white-space: normal;
        /* 允许换行 */
        overflow: visible;
        text-overflow: unset;
    }

    .share-btn-compact {
        align-self: flex-end;
        font-size: 12px;
        padding: 6px 12px;
    }

    .meta-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .meta-item,
    .meta-full-row {
        font-size: 12px;
    }

    .detail-tags {
        gap: 6px;
    }

    .tag {
        padding: 3px 8px;
        font-size: 11px;
    }

    .episodes-grid {
        grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
        gap: 6px;
    }

    .episode-btn {
        padding: 6px 8px;
        font-size: 11px;
    }
}

/* 滚动条美化 */
.detail-info::-webkit-scrollbar,
.episodes-container::-webkit-scrollbar {
    width: 6px;
}

.detail-info::-webkit-scrollbar-track,
.episodes-container::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

.detail-info::-webkit-scrollbar-thumb,
.episodes-container::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
}

.detail-info::-webkit-scrollbar-thumb:hover,
.episodes-container::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

/* 站点管理样式 */
.site-list {
    margin-bottom: 20px;
}

.site-item {
    background: #2d2d2d;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 15px;
    transition: all 0.3s ease;
    border: 1px solid #404040;
}

.site-item:hover {
    background: #3a3a3a;
    border-color: #555;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.site-info {
    width: 100%;
}

.site-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.site-name {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #ffffff;
    flex: 1;
    min-width: 0;
}

.site-status {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.site-status.active {
    background: linear-gradient(135deg, #4CAF50, #45a049);
    color: white;
    box-shadow: 0 2px 4px rgba(76, 175, 80, 0.3);
}

.site-status:not(.active) {
    background: #666;
    color: #ccc;
}

.site-details {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.site-url {
    margin: 0;
    font-size: 14px;
    color: #aaa;
    font-family: 'Consolas', 'Monaco', monospace;
    background: #1a1a1a;
    padding: 8px 12px;
    border-radius: 6px;
    border: 1px solid #333;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.site-type {
    background: linear-gradient(135deg, #2196F3, #1976D2);
    color: #fff;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: bold;
    text-transform: uppercase;
    box-shadow: 0 2px 4px rgba(33, 150, 243, 0.3);
    white-space: nowrap;
}

.site-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.site-actions button {
    min-width: 80px;
    height: 36px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.site-actions button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.btn-test {
    background: linear-gradient(135deg, #2196F3, #1976D2);
    color: white;
}

.btn-test:hover {
    background: linear-gradient(135deg, #1976D2, #1565C0);
}

.btn-test::before {
    content: "🔍";
    font-size: 14px;
}

.btn-edit {
    background: linear-gradient(135deg, #FF9800, #F57C00);
    color: white;
}

.btn-edit:hover {
    background: linear-gradient(135deg, #F57C00, #EF6C00);
}

.btn-edit::before {
    content: "✏️";
    font-size: 14px;
}

.btn-activate {
    background: linear-gradient(135deg, #4CAF50, #388E3C);
    color: white;
}

.btn-activate:hover {
    background: linear-gradient(135deg, #388E3C, #2E7D32);
}

.btn-activate::before {
    content: "⭐";
    font-size: 14px;
}

.btn-delete {
    background: linear-gradient(135deg, #f44336, #d32f2f);
    color: white;
}

.btn-delete:hover {
    background: linear-gradient(135deg, #d32f2f, #c62828);
}

.btn-delete::before {
    content: "🗑️";
    font-size: 14px;
}

/* 站点表单样式 */
.site-form {
    max-width: 500px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: #ffffff;
    font-weight: bold;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 10px;
    border: 1px solid #444;
    border-radius: 4px;
    background: #2d2d2d;
    color: #ffffff;
    font-size: 14px;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #2196F3;
    box-shadow: 0 0 0 2px rgba(33, 150, 243, 0.2);
}

.form-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 20px;
}

.form-actions button {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    transition: all 0.3s ease;
}

.btn-primary {
    background: #2196F3;
    color: white;
}

.btn-primary:hover {
    background: #1976D2;
}

.btn-secondary {
    background: #666;
    color: white;
}

.btn-secondary:hover {
    background: #555;
}

/* 测试结果样式 */
.test-result {
    margin-top: 15px;
    padding: 15px;
    border-radius: 8px;
    font-weight: 500;
    line-height: 1.5;
}

.test-result.hidden {
    display: none;
}

.test-result.testing {
    background: linear-gradient(135deg, #FFF3E0, #FFE0B2);
    color: #E65100;
    border: 1px solid #FFB74D;
    text-align: center;
}

.test-result.success {
    background: linear-gradient(135deg, #E8F5E8, #C8E6C9);
    color: #2E7D32;
    border: 1px solid #81C784;
}

.test-result.error {
    background: linear-gradient(135deg, #FFEBEE, #FFCDD2);
    color: #C62828;
    border: 1px solid #EF5350;
}

.test-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    margin-bottom: 10px;
}

.test-details {
    font-size: 14px;
    line-height: 1.6;
}

.test-details div {
    margin: 4px 0;
    padding: 2px 0;
}

.loading-spinner {
    display: inline-block;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* 测试结果详情模态框 */
.test-result-detail {
    max-width: 600px;
    margin: 0 auto;
}

.test-success {
    background: linear-gradient(135deg, #E8F5E8, #C8E6C9);
    color: #2E7D32;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    text-align: center;
    font-size: 18px;
    font-weight: bold;
}

.test-info {
    background: #f5f5f5;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
    color: #333;
}

.test-info h4 {
    margin: 0 0 10px 0;
    color: #2196F3;
}

.test-info p {
    margin: 5px 0;
}

.test-details {
    background: #f9f9f9;
    padding: 15px;
    border-radius: 8px;
    color: #333;
}

.test-details h4 {
    margin: 0 0 10px 0;
    color: #2196F3;
}

.test-line {
    padding: 3px 0;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 13px;
}

/* 通知样式 */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    max-width: 400px;
    padding: 15px 20px;
    border-radius: 8px;
    font-weight: 500;
    font-size: 14px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 10000;
    animation: slideInRight 0.3s ease-out;
}

.notification.info {
    background: linear-gradient(135deg, #E3F2FD, #BBDEFB);
    color: #1976D2;
    border-left: 4px solid #2196F3;
}

.notification.success {
    background: linear-gradient(135deg, #E8F5E8, #C8E6C9);
    color: #2E7D32;
    border-left: 4px solid #4CAF50;
}

.notification.warning {
    background: linear-gradient(135deg, #FFF3E0, #FFE0B2);
    color: #E65100;
    border-left: 4px solid #FF9800;
}

.notification.error {
    background: linear-gradient(135deg, #FFEBEE, #FFCDD2);
    color: #C62828;
    border-left: 4px solid #f44336;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* 播放方式选择对话框 */
.play-mode-dialog {
    max-width: 500px;
    margin: 0 auto;
}

.play-mode-dialog .video-info {
    background: #f5f5f5;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    color: #333;
    text-align: center;
}

.play-mode-dialog .video-info h4 {
    margin: 0 0 5px 0;
    color: #2196F3;
}

.play-mode-dialog .video-info p {
    margin: 5px 0;
}

.url-preview {
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 12px;
    color: #666;
    background: #eee;
    padding: 8px;
    border-radius: 4px;
    word-break: break-all;
    margin-top: 10px;
}

.play-options {
    display: grid;
    gap: 15px;
    margin-bottom: 20px;
}

.option-btn {
    display: flex !important;
    align-items: center;
    gap: 15px;
    padding: 15px 20px !important;
    text-align: left;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef) !important;
    color: #333 !important;
    border: 2px solid #dee2e6 !important;
    transition: all 0.3s ease;
    width: 100%;
    min-height: auto !important;
}

.option-btn:hover {
    background: linear-gradient(135deg, #e9ecef, #dee2e6) !important;
    border-color: #2196F3 !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(33, 150, 243, 0.2);
}

.option-btn i {
    font-size: 24px;
    flex-shrink: 0;
}

.option-btn div {
    flex: 1;
}

.option-btn strong {
    display: block;
    font-size: 16px;
    margin-bottom: 2px;
}

.option-btn small {
    display: block;
    font-size: 12px;
    color: #666;
    font-weight: normal;
}

/* 空状态样式 */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #888;
}

.empty-state i {
    font-size: 48px;
    margin-bottom: 15px;
    display: block;
}

.empty-state h3 {
    margin: 10px 0;
    color: #aaa;
}

.empty-state p {
    margin: 5px 0;
    font-size: 14px;
}

/* 数据管理区域 */
.data-management-actions {
    display: flex;
    gap: 15px;
    margin-top: 15px;
    align-items: center;
    flex-wrap: wrap;
}

.data-management-actions button {
    min-width: 120px;
    padding: 10px 20px;
    font-size: 14px;
}

.data-management-actions .btn-primary {
    background: linear-gradient(135deg, #4CAF50, #45a049);
    border: none;
    color: white;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.data-management-actions .btn-primary:hover {
    background: linear-gradient(135deg, #45a049, #3d8b40);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
}

.data-management-actions .btn-secondary {
    background: linear-gradient(135deg, #2196F3, #1976D2);
    border: none;
    color: white;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.data-management-actions .btn-secondary:hover {
    background: linear-gradient(135deg, #1976D2, #1565C0);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.3);
}

/* 导入导出结果显示 */
.import-export-result {
    margin-top: 15px;
    padding: 12px 15px;
    border-radius: 6px;
    border-left: 4px solid;
    font-size: 14px;
}

.import-export-result.success {
    background: rgba(76, 175, 80, 0.1);
    border-left-color: #4CAF50;
    color: #4CAF50;
}

.import-export-result.error {
    background: rgba(244, 67, 54, 0.1);
    border-left-color: #f44336;
    color: #f44336;
}

.import-export-result.info {
    background: rgba(33, 150, 243, 0.1);
    border-left-color: #2196F3;
    color: #2196F3;
}

.import-export-result .result-title {
    font-weight: bold;
    margin-bottom: 5px;
}

.import-export-result .result-details {
    font-size: 13px;
    line-height: 1.4;
    margin-left: 10px;
}

.import-export-result .result-details div {
    margin: 2px 0;
}

/* 导入导出模态框样式 */
.export-data-modal,
.import-data-modal {
    padding: 20px;
    max-width: 600px;
    margin: 0 auto;
}

.export-options,
.import-options {
    margin: 20px 0;
}

.export-checkboxes,
.import-checkboxes {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 15px;
}

.checkbox-item,
.radio-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.checkbox-item:hover,
.radio-item:hover {
    background: rgba(255, 255, 255, 0.08);
}

.checkbox-item input[type="checkbox"],
.radio-item input[type="radio"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.checkmark,
.radio-mark {
    width: 18px;
    height: 18px;
    background: #333;
    border: 2px solid #666;
    border-radius: 3px;
    position: relative;
    flex-shrink: 0;
    margin-top: 2px;
    transition: all 0.3s ease;
}

.radio-mark {
    border-radius: 50%;
}

.checkbox-item input[type="checkbox"]:checked+.checkmark,
.radio-item input[type="radio"]:checked+.radio-mark {
    background: #2196F3;
    border-color: #2196F3;
}

.checkmark::after {
    content: "";
    position: absolute;
    display: none;
    left: 5px;
    top: 1px;
    width: 6px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.radio-mark::after {
    content: "";
    position: absolute;
    display: none;
    left: 4px;
    top: 4px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: white;
}

.checkbox-item input[type="checkbox"]:checked+.checkmark::after,
.radio-item input[type="radio"]:checked+.radio-mark::after {
    display: block;
}

.checkbox-item>div,
.radio-item>div {
    flex: 1;
}

.checkbox-item small,
.radio-item small {
    display: block;
    color: #888;
    font-size: 12px;
    margin-top: 4px;
    line-height: 1.3;
}

.export-info,
.import-info {
    margin: 20px 0;
    padding: 15px;
    background: rgba(33, 150, 243, 0.1);
    border-left: 4px solid #2196F3;
    border-radius: 4px;
}

.info-note {
    margin: 0;
    color: #2196F3;
    font-size: 14px;
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.info-note i {
    font-style: normal;
    font-size: 16px;
}

/* 文件选择区域 */
.import-file-section {
    margin: 20px 0;
}

.file-input-wrapper {
    display: flex;
    align-items: center;
    gap: 15px;
    margin: 15px 0;
}

.selected-file-name {
    color: #aaa;
    font-size: 14px;
    flex: 1;
    word-break: break-all;
}

.file-info {
    margin-top: 10px;
}

/* 导入模式选择 */
.import-mode-selection {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 15px 0;
}

/* 导入结果显示 */
.import-results {
    max-height: 400px;
    overflow-y: auto;
    margin: 20px 0;
}

.result-section {
    margin: 15px 0;
    padding: 15px;
    border-radius: 6px;
    border-left: 4px solid;
}

.result-section.success {
    background: rgba(76, 175, 80, 0.1);
    border-left-color: #4CAF50;
}

.result-section.info {
    background: rgba(33, 150, 243, 0.1);
    border-left-color: #2196F3;
}

.result-section.error {
    background: rgba(244, 67, 54, 0.1);
    border-left-color: #f44336;
}

.result-section h4 {
    margin: 0 0 10px 0;
    font-size: 14px;
    font-weight: bold;
}

.result-items {
    font-size: 13px;
    line-height: 1.4;
}

.result-items div {
    margin: 3px 0;
    padding: 2px 0;
}

.import-summary {
    margin-top: 20px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    text-align: center;
}

.no-data-warning {
    color: #f44336;
    font-weight: bold;
    text-align: center;
    padding: 20px;
    background: rgba(244, 67, 54, 0.1);
    border-radius: 6px;
    margin: 15px 0;
}

/* 分享功能样式 */
.share-section {
    margin: 20px 0;
    padding: 15px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.share-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: linear-gradient(135deg, #4a90e2, #357abd);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(74, 144, 226, 0.2);
}

.share-btn:hover {
    background: linear-gradient(135deg, #357abd, #2e6a9e);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(74, 144, 226, 0.3);
}

.share-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(74, 144, 226, 0.2);
}

.share-btn i {
    font-size: 16px;
    font-style: normal;
}

/* 紧凑型分享按钮样式 - 用于标题行右侧 */
.share-btn-compact {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: linear-gradient(135deg, #4a90e2, #357abd);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 6px rgba(74, 144, 226, 0.2);
    flex-shrink: 0;
    /* 防止按钮被压缩 */
    white-space: nowrap;
}

.share-btn-compact:hover {
    background: linear-gradient(135deg, #357abd, #2e6a9e);
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(74, 144, 226, 0.3);
}

.share-btn-compact:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(74, 144, 226, 0.2);
}

.share-btn-compact i {
    font-size: 14px;
    font-style: normal;
}

/* 分享模态框样式 */
.share-modal {
    max-width: 500px;
    width: 100%;
}

.share-instruction {
    color: #ccc;
    margin-bottom: 15px;
    font-size: 14px;
}

.share-content {
    margin: 20px 0;
}

.share-content textarea {
    width: 100%;
    height: 200px;
    background: #2d2d2d;
    border: 1px solid #404040;
    border-radius: 6px;
    padding: 15px;
    color: #fff;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 13px;
    line-height: 1.5;
    resize: vertical;
    cursor: text;
}

.share-content textarea:focus {
    outline: none;
    border-color: #0078d4;
    box-shadow: 0 0 0 2px rgba(0, 120, 212, 0.2);
}

.share-content textarea::selection {
    background: rgba(0, 120, 212, 0.3);
}

/* 分享确认对话框样式 */
.share-confirm-dialog {
    max-width: 450px;
    width: 100%;
}

.share-info {
    margin: 20px 0;
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.share-video-info {
    display: flex;
    gap: 15px;
    align-items: flex-start;
}

.share-poster {
    width: 80px;
    height: 120px;
    object-fit: cover;
    border-radius: 6px;
    flex-shrink: 0;
    background: #404040;
}

.share-details {
    flex: 1;
    min-width: 0;
}

.share-details h4 {
    margin: 0 0 8px 0;
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    line-height: 1.3;
}

.share-source {
    color: #4a90e2;
    font-size: 13px;
    margin: 4px 0;
    font-weight: 500;
}

.share-remarks {
    color: #ffa500;
    font-size: 13px;
    margin: 4px 0;
    font-weight: 500;
}

.share-time {
    color: #888;
    font-size: 12px;
    margin: 4px 0;
}

.confirm-message {
    text-align: center;
    color: #ccc;
    font-size: 14px;
    margin: 20px 0;
    font-weight: 500;
}